<template>
    <div>
        <Header></Header>
        <!-- 指定组件的呈现位置 -->
        <router-view></router-view>  
        <Footer v-show="$route.meta.show"></Footer>
    </div>
</template>

<script>
import Header from './components/Header.vue';
import Footer from './components/Footer.vue';
export default {
  name: 'App',
  components:{ 
      Header,
      Footer
    },
    mounted(){
       //通过Vuex发请求，获取服务器数据，存储在Vuex中
       this.$store.dispatch('home/categoryList');
    }
}
</script>

<style>
  
</style>
